package com.umanji.building.domain;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OrderBy;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

import com.umanji.generic.entity.UUIDEntity;

@Entity
@Table(name="umanji_public_official_building_board")
public class PublicOfficialBuildingBoards extends UUIDEntity<PublicOfficialBuildingBoards> {

	@ManyToOne
	@JoinColumn(name="POBUILDING_ID", insertable=true, updatable=true)
	private PublicOfficialBuildings publicOfficialBuilding;

	@Column(name="TITLE", length=250)
	private String title;

	@Column(name="CONTENT", length=2000)
	private String content;

	@Column(name="NAME", length=50)
	private String name;

	@Column(name="READ_COUNT", length=5)
	private Integer readCount;

	@Temporal(TemporalType.DATE)
	private Date regDate;

	public PublicOfficialBuildingBoards() {
		
	}

	public PublicOfficialBuildingBoards(String title, String content,
			String name, Date regDate, Integer readCount) {
		this.title=title;
		this.content=content;
		this.name=name;
		this.regDate=regDate;
		this.readCount=readCount;
		// TODO Auto-generated constructor stub
	}

	public Date getRegDate() {
		return regDate;
	}

	public void setRegDate(Date regDate) {
		this.regDate = regDate;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setReadCount(Integer readCount) {
		this.readCount = readCount;
	}

	public Integer getReadCount() {
		return readCount;
	}

	public void setPublicOfficialBuilding(PublicOfficialBuildings publicOfficialBuilding) {
		this.publicOfficialBuilding = publicOfficialBuilding;
	}

	public PublicOfficialBuildings getPublicOfficialBuilding() {
		return publicOfficialBuilding;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getContent() {
		return content;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getTitle() {
		return title;
	}

}
